package reviews.task4;


public class UserHelpfulness implements Comparable<UserHelpfulness> {


    /**
     * 用户ID
     */
    private String userId;

    /**
     * 被认可的总人数
     */
    private Integer HelpfulnessValue;

    public UserHelpfulness() {
    }

    public UserHelpfulness(String productId, Integer scoreValue) {
        this.userId = productId;
        this.HelpfulnessValue = scoreValue;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getHelpfulnessValue() {
        return HelpfulnessValue;
    }

    public void setHelpfulnessValue(Integer helpfulnessValue) {
        this.HelpfulnessValue = helpfulnessValue;
    }

    @Override
    public int compareTo(UserHelpfulness o) {
        return o.getHelpfulnessValue().compareTo(this.getHelpfulnessValue());
    }
}
